package mms

class Person {
    String name
    Boolean sex = true
    String education // 学历
    String school  // 毕业院校
    String office // 职位
    String age //年龄
    String cardID // 身份证
    String interest // 兴趣爱好
    String address // 家庭住址
    static hasMany = [ multimedia: Multimedia ]

    String description 
 
    static mapping  = {
        title index:true
    }
    static constraints = {

        name(blank:false)
        sex()
        education(inList:["无","高中","大专","本科","博士","硕士"]) // 学历
        school()  // 毕业院校
        office() // 职位
        age(size:1..120) //年龄 
        description(size:0..2000)
        cardID()
        interest()
        address()
    }

    String toString() { 
        name
    } 
}
